# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=seat
pkgver=0.3
pkgrel=7
groups=('blackarch' 'blackarch-scanner' 'blackarch-recon')
pkgdesc='Next generation information digging application geared toward the needs of security professionals. It uses information stored in search engine databases, cache repositories, and other public resources to scan web sites for potential vulnerabilities.'
arch=('any')
url='http://thesprawl.org/projects/search-engine-assessment-tool/'
license=('GPL2')
depends=('perl' 'perl-xml-smart' 'gtk2-perl' 'gtk2' 'perl-object-multitype')
source=("http://thesprawl.org/media/projects/$pkgname-$pkgver.tar.bz2")
sha512sums=('c3ab9ddb0ffceccdc1aa43037613687d51fc7b67db678b8151ac47a3be450cb250ce5b5b7476c47286787ea09d4334c0ae6c7993a1286f8d297d88228a33a788')

package() {
  cd "$srcdir/seat"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" CHANGELOG VERSION \
    "SEAT Documentation.pdf"
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm -rf CHANGELOG VERSION LICENSE *.pdf LICENSE

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec perl $pkgname "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

